<!DOCTYPE HTML>
<title>Canvas test: 2d.shadow.attributes.shadowOffset.2</title>
<!--[if IE]><script src="../excanvas/excanvas.js"></script><![endif]-->
<script src="../tests.js"></script>
<link rel="stylesheet" href="../tests.css">
<link rel="prev" href="2d.shadow.attributes.shadowOffset.1.html" title="2d.shadow.attributes.shadowOffset.1">
<link rel="next" href="2d.shadow.attributes.shadowColor.1.html" title="2d.shadow.attributes.shadowColor.1">
<body class="show_output">
<p>
 <a href="2d.shadow.attributes.shadowOffset.1.html" accesskey="p" title="[p] 2d.shadow.attributes.shadowOffset.1">&lt;</a>
 <a href="index.html">[index]</a>
 <a href="2d.shadow.attributes.shadowColor.1.html" accesskey="n" title="[n] 2d.shadow.attributes.shadowColor.1">&gt;</a>
<h1><a href="index.2d.html">2d</a>.<a href="index.2d.shadow.html">shadow</a>.<a href="index.2d.shadow.attributes.html">attributes</a>.<a href="index.2d.shadow.attributes.shadowOffset.html">shadowOffset</a>.2</h1>
<p class="desc"></p>
<div class="refs">References:
<ul>

</ul>
</div>

<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {

try { var _thrown = false;
  ctx.shadowOffsetX = Infinity;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetX = Infinity"); }
try { var _thrown = false;
  ctx.shadowOffsetX = -Infinity;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetX = -Infinity"); }
try { var _thrown = false;
  ctx.shadowOffsetX = NaN;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetX = NaN"); }
try { var _thrown = false;
  ctx.shadowOffsetY = Infinity;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetY = Infinity"); }
try { var _thrown = false;
  ctx.shadowOffsetY = -Infinity;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetY = -Infinity"); }
try { var _thrown = false;
  ctx.shadowOffsetY = NaN;
} catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED_ERR: ctx.shadowOffsetY = NaN"); }


});
</script>

